﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LimpaGaragem.BLL.User
{
    public class Favorite
    {
        /// <summary>
        /// Return list of favorite
        /// </summary>
        /// <returns></returns>
        public List<LimpaGaragem.Model.User.Favorite> GetListOfFavorite(int IDUser)
        {
            try
            {
                return new LimpaGaragem.DAO.User.Favorite().GetListOfFavorite(IDUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Insert new favorite
        /// </summary>
        /// <returns>ID FAVORITE</returns>
        public int InsertFavorite(int IDFavoriteUser, int IDUser)
        {
            try
            {
                return new LimpaGaragem.DAO.User.Favorite().InsertFavorite(IDFavoriteUser, IDUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Delete favorite
        /// </summary>
        public void DeleteFavorite(int IDFavorite)
        {
            try
            {
                new LimpaGaragem.DAO.User.Favorite().DeleteFavorite(IDFavorite);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
